package com.ziyun.erp.modules.promotion.service.impl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.promotion.dao.ConfigCouponUcenterDao;
import com.ziyun.erp.modules.promotion.entity.ConfigCouponUcenterEntity;
import com.ziyun.erp.modules.promotion.service.ConfigCouponUcenterService;


@Service("configCouponUcenterService")
public class ConfigCouponUcenterServiceImpl extends ServiceImpl<ConfigCouponUcenterDao, ConfigCouponUcenterEntity> implements ConfigCouponUcenterService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ConfigCouponUcenterEntity> page = this.selectPage(
                new Query<ConfigCouponUcenterEntity>(params).getPage(),
                new EntityWrapper<ConfigCouponUcenterEntity>()
                        .like(StringUtils.isNotBlank((String)params.get("couponTitel")),"coupon_titel", (String) params.get("couponTitel"))
        );

        return new PageUtils(page);
    }

}
